<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
<ui:composition>
	<div id="myReply">

		<h:form>
			<p:dataTable value="#{userBackingBean.myReplyDataModel}" var="reply" paginator="true" currentPageReportTemplate="#{previ}" lazy="true"
				paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink}  {PageLinks}  {CurrentPageReport} {NextPageLink} {LastPageLink}"
				rows="20" tableStyleClass="noBorderTable" paginatorPosition="bottom">
				<p:column>
					<f:facet name="header">
						<h:outputText value="#{msgs.Reply_label}" />
					</f:facet>

					<p:commandLink value="#{reply.subject}" actionListener="#{userBackingBean.viewReply(reply)}" process="@form" update=":replyViewForm"
						oncomplete="replyDlg.show();return false;"></p:commandLink>
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="#{msgs.CreatedBy}" />
					</f:facet>
					<h:outputFormat value="#{reply.createTime}">
						<f:convertDateTime pattern="H:mm a, MMM d yyyy" />
					</h:outputFormat>
				</p:column>
			</p:dataTable>
		</h:form>
		<h:form id="replyViewForm">
			<p:dialog header="View Reply" widgetVar="replyDlg" resizable="true" modal="true" rendered="true" id="replyDlgId" width="600" height="400">

				<table id="MyReplyTable">
					<tr>
						<td class="readFloor_Left">

							<div>
								<h:graphicImage value="/resources/profilepic/#{userBackingBean.reply.owner.profilePicName}" />
								<div>
									<h:outputLabel value="#{msgs.User_Id}#{userBackingBean.reply.owner.userId} " />
									<div>#{userBackingBean.reply.owner.title}</div>
								</div>

								<div>
									<label>#{msgs.Member_Since}</label>
									<h:outputFormat value="#{userBackingBean.reply.owner.createTime}">
										<f:convertDateTime pattern="yyyy-MM-dd" />
									</h:outputFormat>
								</div>
								<div>
									<label>#{msgs.Post}</label>#{userBackingBean.reply.owner.numOfPosts}
								</div>

							</div>
						</td>
						<td class="readFloor_main">
							<div class="readTop">
								<h:link value=" #{userBackingBean.reply.subject}" outcome="/thread/viewthread" styleClass="longstyle">
									<f:param name="id" value="#{userBackingBean.reply.thread.id}"></f:param>
								</h:link>

							</div>

							<div class="readFloor_Main_Top_Misc">
								#{msgs.Post_Label}
								<h:outputFormat value="#{userBackingBean.reply.createTime}">
									<f:convertDateTime pattern="yyyy-MM-dd HH:mm a" />
								</h:outputFormat>
							</div>
							<div class="readFloor_Main_Content">

								<h:outputText value="#{userBackingBean.reply.content}" escape="false"></h:outputText>

							</div>
						</td>
					</tr>
				</table>



			</p:dialog>
		</h:form>
	</div>

</ui:composition>
</html>